package com.bh.extend.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bh.common.annotation.Dict;
import com.bh.common.annotation.Excel;
import com.bh.common.core.domain.BhtmsBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 客户管理对象 jc_customer
 *
 * @author slx
 * @date 2023-04-02
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "客户管理对象", description = "客户管理对象")
@TableName("jc_customer")
@Data
public class JcCustomer extends BhtmsBaseEntity implements Serializable {
    


    /**
     * 客户名称大写首字母
     */
    @Excel(name = "客户名称大写首字母")
    private String firstUpper;

    /**
     * 合同开始日期
     */
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd")
    @Excel(name = "合同开始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /**
     * 合同结束日期
     */
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd")
    @Excel(name = "合同结束日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /**
     * 合同结束日期
     */
    @TableField(exist = false)
    private Integer days;

    /**
     * 账期
     */
    @Excel(name = "账期")
    private Long paymentDays;

    /**
     * 销售负责人
     */
    @Excel(name = "销售负责人")
    private String salePerson;

    /**
     * 结算方式
     */
    @Excel(name = "结算方式")
    private String settlementType;

    /**
     * 注册公司
     */
    @Dict(dictTable = "jc_registration", dictLabel = "name", dictValue = "id")
    @Excel(name = "注册公司")
    private String jcRegistration;

    /**
     * 组织机构
     */
    @Dict(dictTable = "jc_sys_organization", dictLabel = "name", dictValue = "id")
    @Excel(name = "组织机构")
    private Long jcOrganizationId;

    @Dict(dictTable = "jc_sys_organization", dictLabel = "name", dictValue = "id")
    @Excel(name = "适用网点范围")
    private String jcOrganizationIds;

    @Dict(dictTable = "jc_zone", dictLabel = "name", dictValue = "id")
    private String jcZones;
    @TableField(exist = false)
    private String jcZonesDtLabel;
    /**
     * 行政区域 城市
     */
    @Dict(dictTable = "jc_zone", dictLabel = "name", dictValue = "id")
    @Excel(name = "行政区域 城市")
    private Long jcZoneId;

    /**
     * 合同文件
     */
    private String contactFile;


    /**
     * 取货费用
     */
    private BigDecimal pickupCost;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("code", getCode())
                .append("createName", getCreateName())
                .append("createTime", getCreateTime())
                .append("description", getDescription())
                .append("modifyName", getModifyName())
                .append("modifyTime", getModifyTime())
                .append("name", getName())
                .append("status", getStatus())
                .append("startTime", getStartTime())
                .append("endTime", getEndTime())
                .append("paymentDays", getPaymentDays())
                .append("salePerson", getSalePerson())
                .append("settlementType", getSettlementType())
                .append("jcRegistration", getJcRegistration())
                .append("jcOrganizationId", getJcOrganizationId())
                .append("jcZoneId", getJcZoneId())
                .append("contactFile", getContactFile())
                .toString();
    }
}
